Implement tools for diffing sets of owners of repo paths; update the regex-based CODEOWNERS matching logic#5165
Merged
konrad-jamrozik merged 5 commits intomainfrom Jan 23, 2023
Merged
Conversation
11eaa5d to
a2396b2
Compare
This was referenced Jan 19, 2023
weshaggard
reviewed
Jan 19, 2023
tools/code-owners-parser/CodeOwnersParser/MatchedCodeownersEntry.cs
Outdated
Show resolved
Hide resolved
weshaggard
reviewed
Jan 19, 2023
Contributor
Author
|
@weshaggard I updated the matcher logic. Please have a look once you have a moment :) Thanks! Before merging I'll make a pass over comments and PR description to ensure they correctly reflect the new implementation. These comments might be outdated a bit right now. |
04c6f7e to
f17ba9b
Compare
added 2 commits
January 23, 2023 13:20
This was referenced Jan 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements tools for diffing list of owners for all files in given repository, allowing one to quickly determine how the resolved list of owners for all repository file paths will change if a different CODEOWNERS matcher is used, or the contents of the file are changed.
And as such, this PR contributes to:
And contributes to providing information necessary to unblock this PR:
Per this comment:
This PR builds upon the logic implemented in:
retrieve-codeownerstool support for returning owners for all paths matching given glob path. #5134Changes made
CodeownersDiffTestsclass, a series of tools to be used manually to diff owners of files based on differing sets of settingsMatchedCodeownersEntry, i.e. the regex-based CODEOWNERS matcher, where the matcher was "eating up slashes too aggressively" when interpreting**, resulting in more matches being made than desired. I added tests toCodeownersFileTeststo cover these cases.